'''
@Project ：my_python_project 
@File    ：logging模块.py
@IDE     ：PyCharm 
@Author  ：xionglinhui
@Date    ：2024/9/20 上午8:40 
'''

import logging
import time
import os

logfile = os.path.join(os.path.dirname(__file__), 'access.log')

logging.basicConfig(

    # filename = logfile,

    format = '%(asctime)s - %(name)s - %(levelname)s -%(module)s:  %(message)s',

    datefmt='%Y-%m-%d %H-%M-%S %p',

    level=30,
)

logging.debug('调试debug')
logging.info('消息info')
logging.warning('警告warn')
logging.error('错误error')
logging.critical('严重critical')
